<?php

use App\ArticleType;
use Illuminate\Database\Seeder;

class ArticleTypeTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        // Let's truncate our existing records to start from scratch.
        ArticleType::truncate();

        $faker = \Faker\Factory::create();

        // And now, let's create a few articles in our database:
        for ($i = 0; $i < 5; $i++) {
            ArticleType::create([
                'id' => $i+1,
                'name' =>['知识记录','经验总结','收藏手册','社会生活','科技发展','产品思考'][random_int(0,5)],
            ]);
        }
    }
}
